<?php
/**
 * @package WordPress
 * @subpackage Bside theme
 */

get_header(); ?>

    <div id="container"><!-- begin of container -->
	<div id="content" class="front-column"><!-- homepage left column -->

	<?php if (have_posts()) : ?>
        <?php //query_posts('cat=-789'); ?>
		<?php while (have_posts()) : the_post(); ?>

			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
        <div class="postmeta">
        <span class="date"><?php if(function_exists('the_views')) { the_views(); } ?></span>
        <span class="date">=<?php the_author(); ?>=发表于<?php echo get_the_time('Y-m-d') ?></span>
        <span class="author">{ <span class="bigfont"><?php the_category('single') ?></span> }</span>
        </div>
        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a><span><?php if(has_tag('thebest')) echo '&hearts;' ?></span></h2>

				<div class="entry">
                    <!--<?php $thumbnails = get_post_custom_values("Thumbnails"); if ($thumbnails != '') : ?>
                    <p><a class="pic" href="<?php the_permalink() ?>" title="<?php the_title(); ?>" ><img class="alignright thumbnails" src="http://img.qianli.me/pic/<?php echo $thumbnails[0]; ?>" alt="<?php echo $thumbnails[0]; ?>" /></a></p> 
                    <?php endif; ?>-->
                    <?php the_content('请继续阅读 &raquo;'); ?>
				</div>

        <p class="postmetadata">
            <span class="hcat"><?php if (get_the_tags()) the_tags('[ ',', ',' ]') ?>  <?php edit_post_link('Edit', '', ''); ?></span>
            <span class="hcomm">[ <?php comments_popup_link('请留言 &#187;', '<span class="bigfont">1</span> 条留言 &#187;', '<span class="bigfont">%</span> 条留言 &#187;'); ?> ]</span>
        </p>
			</div>

		<?php endwhile; ?>
		<div class="navigation">
            <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
                <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
                <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
            <?php } ?>
		</div>


	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
		<?php get_search_form(); ?>

	<?php endif; ?>

	</div><!-- end of content -->
    </div><!-- end of container -->
<?php get_sidebar(); ?>
<!-- show categories -->
<?php include (TEMPLATEPATH . '/includes/front_categories.php'); ?>
<?php get_footer(); ?>
